Skip to content

ssh: Fix keepalive response stealing channel open requests#11205

Open
u3s wants to merge 1 commit into
erlang:maintfrom
u3s:kuba/ssh/fix-global-request-race/OTP-20181
Open

ssh: Fix keepalive response stealing channel open requests#11205
u3s wants to merge 1 commit into
erlang:maintfrom
u3s:kuba/ssh/fix-global-request-race/OTP-20181

Conversation

@u3s
Copy link
Copy Markdown
Contributor

@u3s u3s commented Jun 5, 2026

A keepalive response (ssh_msg_request_success) could consume a pending channel open entry from the shared requests queue, causing the channel setup to fail silently with a timeout.

Replace positional head-matching of the requests list with take_global_request/1 that selects entries by reference key, skipping integer-keyed channel entries. Register keepalive probes in the queue so their responses are properly consumed.

@u3s u3s self-assigned this Jun 5, 2026
@u3s u3s added the team:PS Assigned to OTP team PS label Jun 5, 2026
@u3s u3s requested a review from Mikaka27 June 5, 2026 16:43
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

CT Test Results

    2 files     29 suites   25m 35s ⏱️
  502 tests   496 ✅  6 💤 0 ❌
1 711 runs  1 683 ✅ 28 💤 0 ❌

Results for commit 53b994b.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@u3s u3s force-pushed the kuba/ssh/fix-global-request-race/OTP-20181 branch from ce21075 to 2337bd6 Compare June 5, 2026 16:47
@u3s u3s added the testing currently being tested, tag is used by OTP internal CI label Jun 5, 2026
@u3s
Copy link
Copy Markdown
Contributor Author

u3s commented Jun 5, 2026

FYI, @alexandrejbr

@u3s u3s removed the request for review from Mikaka27 June 8, 2026 06:13
A keepalive response (ssh_msg_request_success) could consume a
pending channel open entry from the shared requests queue, causing
the channel setup to fail silently with a timeout.

Replace positional head-matching of the requests list with
take_global_request/1 that selects entries by reference key,
skipping integer-keyed channel entries. Register keepalive
probes in the queue so their responses are properly consumed.
@u3s u3s force-pushed the kuba/ssh/fix-global-request-race/OTP-20181 branch from 2337bd6 to 53b994b Compare June 8, 2026 07:17
@u3s u3s requested a review from Mikaka27 June 8, 2026 08:02
Copy link
Copy Markdown
Contributor

@Mikaka27 Mikaka27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but let's wait for results from CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants